<h2>题目编号 : 115</h2>
<div style="color:#666;font-size:80%;">24 February 2006</div><br />
<div class="problem_content">
<p class="info">NOTE: This is a more difficult version of problem <a href="index.php?section=problems&amp;id=114">114</a>.</p>
<p>A row measuring <i>n</i> units in length has red blocks with a minimum length of <i>m</i> units placed on it, such that any two red blocks (which are allowed to be different lengths) are separated by at least one black square.</p>
<p>Let the fill-count function, F(<i>m</i>, <i>n</i>), represent the number of ways that a row can be filled.</p>
<p>For example, F(3, 29) = 673135 and F(3, 30) = 1089155.</p>
<p>That is, for <i>m</i> = 3, it can be seen that <i>n</i> = 30 is the smallest value for which the fill-count function first exceeds one million.</p>
<p>In the same way, for <i>m</i> = 10, it can be verified that F(10, 56) = 880711 and F(10, 57) = 1148904, so <i>n</i> = 57 is the least value for which the fill-count function first exceeds one million.</p>
<p>For <i>m</i> = 50, find the least value of <i>n</i> for which the fill-count function first exceeds one million.</p>

</div><br />
